package zr.com.thread.tujiejavapattern.ch0102;

import java.util.HashMap;

import static java.util.Collections.synchronizedMap;

public class Main {
    public static void main(String[] args) {
        Gate gate = new Gate();
        HashMap<String,String> map = new HashMap();
        synchronizedMap(map);
        new UserThread(gate,"Alice","Alaska").start();
        new UserThread(gate,"Bobby","Brazil").start();
        new UserThread(gate,"Chris","Canada").start();
    }
}
